package com.gzz.orchid.common.core.tuple;

import lombok.Data;

import java.util.List;

/**
 * 树选项节点
 *
 * @author higmd
 */
@Data
public class TreeNode<T> {
    private String label;
    private T value;
    private List<TreeNode<T>> children;

    public static <T> TreeNode<T> of(String label, T value) {
        TreeNode<T> node = new TreeNode<>();
        node.setLabel(label);
        node.setValue(value);
        return node;
    }
}
